<html>
<head>
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body>

<form class="layui-form" action="" style="margin-top: 20px;margin-right: 30px;">

    <input type="hidden" name="id" value="{$data.id}">
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block">
            <input type="radio" name="sheet_type" value="1" title="指定师傅" <?php if($data['sheet_type'] == 1): ?>checked<?php endif; ?>>
            <input type="radio" name="sheet_type" value="2" title="抢单"  <?php if($data['sheet_type'] == 2): ?>checked<?php endif; ?>>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">师傅ID</label>
        <div class="layui-input-block">
            <input type="text" name="master_id" required  lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" value="{$data.master_id}">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
        </div>
    </div>
</form>


<script src="/js/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="/layui/layui.js"></script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        form.render();

        //监听提交
        form.on('submit(formDemo)', function(data){
            var data = data.field;

            $.post("/ops/orders/edit", data, function (res) {
               var res = JSON.parse(res);
               if(res.errno==0){
                   layer.msg('操作成功')
               }

                window.parent.location.reload();
            });
            return false;
        });
    });

</script>


</body>
</html>

